Integrand size = 31, antiderivative size = 117 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) \text {arctanh}(\sin (e+f x))}{2 a f}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f} \]
[Out]
Time = 0.29 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.46, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4072, 100, 152, 65, 223, 209} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}-\frac {d \tan (e+f x) \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a f}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^2}{f (a \sec (e+f x)+a)} \]
[In]
[Out]
Rule 65
Rule 100
Rule 152
Rule 209
Rule 223
Rule 4072
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c+d x)^3}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x) \left (-a^2 (3 c-2 d) d+a^2 (2 c-3 d) d x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}-\frac {\left (3 a d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}+\frac {\left (3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}+\frac {\left (3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {3 d \left (2 c^2-2 c d+d^2\right ) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f} \\ \end{align*}
Time = 1.60 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.67 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) \text {arctanh}(\sin (e+f x))+2 (c-d)^3 \tan \left (\frac {1}{2} (e+f x)\right )+d^2 (6 c-2 d+d \sec (e+f x)) \tan (e+f x)}{2 a f} \]
[In]
[Out]
Time = 0.83 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.55
method | result | size |
parallelrisch | \(\frac {-3 \left (c^{2}-c d +\frac {1}{2} d^{2}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+3 \left (c^{2}-c d +\frac {1}{2} d^{2}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\left (c^{3}-3 c^{2} d +6 c \,d^{2}-2 d^{3}\right ) \cos \left (2 f x +2 e \right )+\left (6 c \,d^{2}-d^{3}\right ) \cos \left (f x +e \right )+c^{3}-3 c^{2} d +6 c \,d^{2}-d^{3}\right )}{a f \left (1+\cos \left (2 f x +2 e \right )\right )}\) | \(181\) |
derivativedivides | \(\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}}{f a}\) | \(208\) |
default | \(\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}}{f a}\) | \(208\) |
norman | \(\frac {\frac {\left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}+\frac {\left (3 c^{3}-9 c^{2} d +21 c \,d^{2}-7 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}-\frac {3 \left (c^{3}-3 c^{2} d +5 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}-\frac {\left (c^{3}-3 c^{2} d +9 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 a f}\) | \(245\) |
risch | \(\frac {i \left (2 c^{3} {\mathrm e}^{4 i \left (f x +e \right )}-6 c^{2} d \,{\mathrm e}^{4 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-3 d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}-3 d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+4 c^{3} {\mathrm e}^{2 i \left (f x +e \right )}-12 c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+18 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-5 d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-d^{3} {\mathrm e}^{i \left (f x +e \right )}+2 c^{3}-6 c^{2} d +12 c \,d^{2}-4 d^{3}\right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{2}}-\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{2}}{a f}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c}{a f}-\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 a f}+\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{2}}{a f}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c}{a f}+\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 a f}\) | \(382\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.85 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 \, {\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (d^{3} + 2 \, {\left (c^{3} - 3 \, c^{2} d + 6 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (6 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{4 \, {\left (a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {c^{3} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 388 vs. \(2 (114) = 228\).
Time = 0.22 (sec) , antiderivative size = 388, normalized size of antiderivative = 3.32 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {d^{3} {\left (\frac {2 \, {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + 6 \, c d^{2} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (f x + e\right )}{{\left (a - \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 6 \, c^{2} d {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - \frac {2 \, c^{3} \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{2 \, f} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.87 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 \, c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a} - \frac {2 \, {\left (6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a}}{2 \, f} \]
[In]
[Out]
Time = 13.68 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.19 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,c\,d^2-d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (6\,c\,d^2-3\,d^3\right )}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\right )}+\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\left (c-d\right )}^3}{a\,f}+\frac {3\,d\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{a\,f} \]
[In]
[Out]